﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DMS.Common.Model.Result;
using SqlSugar.Template.IService.Param;
using SqlSugar.Template.IService.Result;

namespace SqlSugar.Template.IService
{
    public interface IUseService
    {
        /// <summary>
        /// 异步新增
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<ResponseResult> Add(AddUseParam param);

        /// <summary>
        /// 事物处理
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<ResponseResult> AddTran(AddBookParam param);

        /// <summary>
        /// 异步修改
        /// </summary>
        /// <returns></returns>
        Task<ResponseResult> UpdateAsync(EditUseParam param);

        /// <summary>
        /// 异步删除
        /// </summary>
        /// <returns></returns>
        Task<ResponseResult> DeleteAsync(long Id);

        /// <summary>
        /// 异步查询
        /// </summary>
        /// <returns></returns>
        Task<ResponseResult<PageModel<UseResult>>> SearchUseAsync(SearchUseParam param);

        /// <summary>
        /// 异步查询
        /// </summary>
        /// <returns></returns>
        Task<ResponseResult<UseResult>> GetBookAsync(string BookId);

        /// <summary>
        /// 异步查询
        /// </summary>
        /// <returns></returns>
        Task<ResponseResult<UseResult>> GetUseByAccountAndPwdAsync(string Account,string Pwd);
    }
}
